package com.snbc.Exception;

/**
 * @Classname Test
 * @Description TODO
 * @Date 2019/9/15 21:50
 * @Created by Acer
 */
public class Test {

    public static void main(String[] args) {
        Hero hero1 = new Hero();
        hero1.name = "盖伦";
        hero1.hp = 616;

        Hero hero2 = new Hero();
        hero2.name = "提莫";
        hero2.hp = 0;

        try {
            hero1.attackHero(hero2);
        } catch (EnemyHeroIsDeadException e) {
            System.out.println("异常的具体原因:" + e.getMessage());
            e.printStackTrace();
        }
    }
}
